import request from '@/utils/request';

/**
 * @author yykk
 * @date: 2022-05-06 23:48:13
 * @desc: 首页分类模块业务
 * @version：1.0.0
 */
export default {

  // 1: 查询$搜索&分页首页分类
  findIndexCategoryPage(indexcategoryVo = {pageNo: 1, pageSize: 10}) {
    return request.post("indexcategory/list", indexcategoryVo);
  },

  // 2: 查询首页分类列表
  findIndexCategoryList() {
    return request.get("indexcategory/load");
  },

  // 3: 保存&修改首页分类
  saveUpdateIndexCategory(indexcategory = {}) {
    return request.post("indexcategory/saveupdate", indexcategory);
  },

  // 4: 根据id删除首页分类
  delIndexCategory(id) {
    if (!id) {
      return;
    }
    return request.post("indexcategory/delete/" + id);
  },

  // 5: 批量删除首页分类
  delBatchIndexCategory(batchIds) {
    if (!batchIds) {
      return;
    }
    return request.post("indexcategory/delBatch", {batchIds});
  },

  // 6: 根据id查询首页分类明细
  getIndexCategory(id) {
    if (!id) {
      return;
    }
    return request.get("indexcategory/get/" + id);
  },


}
